#include<stdio.h>
#include<stdlib.h>
#include<iostream>
using namespace std;
extern char** environ;	//声明环境变量表nmain(int argc,char *argv[])
int main(int argc,char* argv[])
{
  int pos=0;
  while(environ[pos])
  {
    cout << environ[pos++] << endl;
  }
  for(int i=0;argv[i];i++)
  {
    printf("argv[%d]:%s\n",i,argv[i]);
  }
  printf("PATH:%s\n",getenv("PATH"));
  printf("PWD:%s\n",getenv("PWD"));
  printf("传递测试程序\n");
  return 0;
}
